Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLTFRS-18353: Filter out non healthy on non in services instances from ASG #7

Merged
merged 5 commits into from
Oct 4, 2023

Conversation

bplessis-swi
Copy link
Collaborator

Also:

  • update to latest go version
  • Update workflows to work without internal actions since public
  • Update dependencies

.github/workflows/release.yml Show resolved Hide resolved
go.mod Show resolved Hide resolved
instances := make([]*string, numInstances)
for i, inst := range resp2.AutoScalingGroups[0].Instances {
if (*inst.HealthStatus == "Healthy" && *inst.LifecycleState == "InService") {
instances[i] = inst.InstanceId
Copy link

@msangoi msangoi Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You created the instances slice with an initial length. Some elements will not be assigned and left with the default value (empty string). No issue when calling the DescribeInstances function with it?

You could have created an empty slice and append instances to it when they are healthy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be better now

@bplessis-swi bplessis-swi requested a review from msangoi October 3, 2023 16:20
@bplessis-swi bplessis-swi merged commit 43095fe into main Oct 4, 2023
2 checks passed
@bplessis-swi bplessis-swi deleted the PLTFRS-18353 branch October 4, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants